package com.da.landlord;

import java.io.File;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.googlecode.cswish.annotation.cm;

/**
 * 房源附件表
 * 
 * @author Peter.Z
 *
 */
@Entity
@Table(name="da_dasuiteattachment")
public class DaSuiteAttachment {

	@cm("id")
	private Integer id;
	
	@cm("所属房源")
	private DaSuite Suite;
	
	@cm("0图片 1视频")
	private Integer contentType;

	@cm("附件")
	private File attachment;
	
	private String attachmentContentType;
	
	private String attachmentFileName;

	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne
	public DaSuite getSuite() {
		return Suite;
	}

	public void setSuite(DaSuite suite) {
		Suite = suite;
	}

	public Integer getContentType() {
		return contentType;
	}

	public void setContentType(Integer contentType) {
		this.contentType = contentType;
	}

	@Transient
	public File getAttachment() {
		return attachment;
	}

	public void setAttachment(File attachment) {
		this.attachment = attachment;
	}

	@Transient
	public String getAttachmentContentType() {
		return attachmentContentType;
	}

	public void setAttachmentContentType(String attachmentContentType) {
		this.attachmentContentType = attachmentContentType;
	}

	public String getAttachmentFileName() {
		return attachmentFileName;
	}

	public void setAttachmentFileName(String attachmentFileName) {
		this.attachmentFileName = attachmentFileName;
	}
	
}
